<local:DocumentBase x:Class="WPFExcelReport.ITXSETUP"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" 
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core" 
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:tra="clr-namespace:WPFExcelReport.TranslationByMarkupExtension;assembly=ReflectionStudio.Core"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
        Title="参数设定"   HorizontalAlignment="Stretch"
                    Loaded="Window_Loaded"
                    VerticalAlignment="Stretch"
                    Height="400"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/> 
        <CollectionViewSource  x:Key="vwHRSTAMM" Source="{Binding Path=SetEnv.HRSTAMM}"/>
        <CollectionViewSource  x:Key="vwICC_FUNCTIONS" Source="{Binding Path=SetEnv.ICC_FUNCTIONS}"/>
        <CollectionViewSource  x:Key="vwFUNCTION" Source="{Binding Path=SetMaster.ICC_FUNCTIONS}"/>
        <CollectionViewSource  x:Key="vwFOLDER" Source="{Binding Path=SetMaster.ICC_FOLDERS}"/>
        <CollectionViewSource  x:Key="vwMENU" Source="{Binding Path=SetMaster.ICC_MENUDEF}"/>
        <!--CollectionViewSource  x:Key="vwMENU" Source="{Binding Path=ICC_MENUDEF,Source={StaticResource SetMaster}}"/-->
        <CollectionViewSource  x:Key="vwTMPFUNCTION" Source="{Binding Path=SetDetail.ICC_FUNCTIONS}"/>
        <CollectionViewSource  x:Key="vwTMPMENU" Source="{Binding Path=SetDetail.ICC_MENUDEF}"/>
        <CollectionViewSource  x:Key="vwTMPFOLDER" Source="{Binding Path=SetDetail.ICC_FOLDERS}"/>
        <CollectionViewSource  x:Key="vwMULLANG" Source="{Binding Path=SetMaster.ICC_MULLANG}"/>
        <CollectionViewSource  x:Key="vwTMPMULLANG" Source="{Binding Path=SetDetail.ICC_MULLANG}"/>
        <CollectionViewSource  x:Key="vwGABBS" Source="{Binding Path=SetMaster.ICC_GABBS}"/>
        <CollectionViewSource  x:Key="vwTMPGABBS" Source="{Binding Path=SetDetail.ICC_GABBS}"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition  Height="*" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" >
            <WrapPanel>
                <StackPanel>
                    <Button  Height="40"  Width="40" Margin="0,0,0,0" Name="btnGetCADMap" 
                         KeyboardNavigation.TabIndex="3" IsDefault="True">
                        <Button.Background>
                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Reload.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=重新生成接口定义}}"></TextBlock>
                </StackPanel>
                <StackPanel>
                    <Button  Name="cmdSaveMap"  Width="40" Height="40">
                        <Button.Background>
                            <ImageBrush  ImageSource="/IntexReportClient;component/Images/Upload.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=加载接口定义}}"></TextBlock>
                </StackPanel>
            </WrapPanel>
        </StackPanel>
        <TabControl Grid.Row="1">
            <TabItem Header="{Binding Source={Localization:Translate Word=菜单管理}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                        <WrapPanel >
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=装载本地}}" Click="butMenuLoad_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="butMenuITXLoad_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=复制}}" Click="butMenuCopy_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=编辑}}" Click="butMenuEdit_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=全部复制}}" Click="butMenuCopyAll_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=新建}}" Click="butNewMenu_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=取消}}" Click="butDiscard_Click"></Button>

                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="butMenuSave_Click"></Button>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=当前用户菜单更改要复制为新用户，名称可以一样}}"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=当前用户}}"></TextBlock>
                            <ComboBox  Name="txtCurrentUser"
                                       Text="{Binding USERID,Source={ StaticResource ResourceKey=vwMENU}}" 
                                       ItemsSource="{Binding Source={StaticResource ResourceKey=vwMENU}}"
                                       Background="Yellow"  MinWidth="100"  
                                       DisplayMemberPath="USERID"
                                       IsEditable="True"
                                       SelectedValuePath="USERID"
                                       >
                            </ComboBox>
                            <TextBlock>目标用户</TextBlock>
                            <ComboBox  Name="txtNewUser"
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwHRSTAMM}}"
                                Background="Gray"  MinWidth="100"  
                                       DisplayMemberPath="HRBENID"
                                       IsEditable="True"
                                      SelectedValuePath="HRBENID"
                                       >
                            </ComboBox>
                            <Button Width="Auto" Content="{Binding Source={Localization:Translate Word=过滤}}" Margin="10,0,0,0"  HorizontalAlignment="Left"  Click="btnFilterMENU_Click"></Button>
                            <Button Width="Auto" Content="{Binding Source={Localization:Translate Word=清除}}" Margin="10,0,0,0" HorizontalAlignment="Left"  Click="btnFilterMenuClear_Click"></Button>
                            <Button Width="Auto" Content="{Binding Source={Localization:Translate Word=整理}}"  Margin="10,0,0,0" HorizontalAlignment="Left"  Click="btnFilterMenuHidden_Click"></Button>
                        </WrapPanel>
                        <WrapPanel>
                            <WrapPanel>
                                <TextBlock Text="{Binding Source={Localization:Translate Word=用户}}"></TextBlock>
                                <ComboBox   
                                     Text="{Binding USERID,Source={ StaticResource ResourceKey=vwTMPMENU}}" 
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwHRSTAMM}}"
                                Background="Gray"  MinWidth="100"  
                                       DisplayMemberPath="HRBENID"
                                       IsEditable="True"
                                      SelectedValuePath="HRBENID"
                                       >
                                </ComboBox>
                                <TextBlock Text="{Binding Source={Localization:Translate Word=处理}}"></TextBlock>
                                <ComboBox  
                                    Text="{Binding PROCESS,Source={ StaticResource ResourceKey=vwTMPMENU}}" 
                                    Background="Gray"  MinWidth="100"  
                                    IsEditable="True"
                                    >
                                    <ComboBoxItem>MENU</ComboBoxItem>
                                    <ComboBoxItem>HIDDEN</ComboBoxItem>
                                </ComboBox>
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock Text="{Binding Source={Localization:Translate Word=位置}}"></TextBlock>
                                <ComboBox  
                                    Text="{Binding FATHER,Source={ StaticResource ResourceKey=vwTMPMENU}}" 
                                    Background="Gray"  MinWidth="100"  
                                    IsEditable="True"
                                    >
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=工艺管理}}">gpArticle</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=单证}}">gpDoc</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=销售部}}">gpSales</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=计划部}}">gpPlan</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=计划-原料供应}}">gpMaterilaSupply</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=计划-仓库}}">gpMaterial</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=统计-浆纱}}">gpSizing</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=统计-染纱}}">gpDye</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=统计-生产}}">gpProd</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=统计-生产}}">gpProduction</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=统计-产量}}">gpOutput</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=统计-成品}}">gpFinish</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=采购部}}">gpEK</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=仓库管理}}">gpWarehouse</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=质量}}">gpWS03</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=计划部}}">gbSales</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=计划部}}">gpPlan</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=综合}}">gpGreige</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=财务}}">gpINOUTINV</ComboBoxItem>
                                    <ComboBoxItem ToolTip="{Binding Source={Localization:Translate Word=系统设定}}">gpSystem</ComboBoxItem>
                                </ComboBox>
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock Text="{Binding Source={Localization:Translate Word=功能名称}}"></TextBlock>
                                <TextBox Background="White"  FontSize="14"   Margin="10,0,0,0"  Width="120"  
                                 Text="{Binding HEADER,Converter={StaticResource ResourceKey=gb2312}, Source={ StaticResource ResourceKey=vwTMPMENU}}" CharacterCasing="Upper" />
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock Text="{Binding Source={Localization:Translate Word=功能}}"></TextBlock>
                                <ComboBox 
                                     Text="{Binding TAG,Source={ StaticResource ResourceKey=vwTMPMENU}}"
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwICC_FUNCTIONS}}"
                                    SelectionChanged="cmbFunction_SelectionChanged"
                                Background="Gray"  MinWidth="100"  
                                       DisplayMemberPath="TYPE"
                                       IsEditable="True"
                                      SelectedValuePath="TYPE"
                                       >
                                </ComboBox>
                            </WrapPanel>
                        </WrapPanel>

                    </StackPanel>
                    <DataGrid Grid.Row="1" Grid.Column="0"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              Name="dlgMenu"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMENU}}"  
                              HeadersVisibility="Column"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.ColumnSpan="1" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="{Binding Source={Localization:Translate Word=公司}}"   Width="Auto"  MinWidth="40"/-->
                            <DataGridTextColumn Binding="{Binding Path=USERID}" Header="{Binding Source={Localization:Translate Word=USERID}}"  Width="Auto" MinWidth="30"/>
                            <DataGridTextColumn Binding="{Binding Path=PROCESS}" Header="{Binding Source={Localization:Translate Word=处理}}"  Width="Auto" MinWidth="60"/>
                            <DataGridTextColumn Binding="{Binding Path=FATHER}" Header="{Binding Source={Localization:Translate Word=FATHER}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=HEADER, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=功能}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TAG}" Header="{Binding Source={Localization:Translate Word=TAG}}"  Width="Auto" MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=ICON}" Header="{Binding Source={Localization:Translate Word=ICON}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUID}" Header="{Binding Source={Localization:Translate Word=MENUID}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUITEM}" Header="{Binding Source={Localization:Translate Word=MENUITEM}}"   Width="Auto"  MinWidth="60"/>
                            <DataGridTextColumn Binding="{Binding Path=LARGEICON}" Header="{Binding Source={Localization:Translate Word=LARGEICON}}"  Width="Auto" MinWidth="40"/-->
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid Grid.Row="1" Grid.Column="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPMENU}}"  
                              HeadersVisibility="Column"
                            VerticalAlignment="Stretch"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="{Binding Source={Localization:Translate Word=公司}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=USERID}" Header="{Binding Source={Localization:Translate Word=USERID}}"  Width="Auto" MinWidth="30"/>
                            <DataGridTextColumn Binding="{Binding Path=PROCESS}" Header="{Binding Source={Localization:Translate Word=处理}}"  Width="Auto" MinWidth="60"/>
                            <DataGridTextColumn Binding="{Binding Path=FATHER}" Header="{Binding Source={Localization:Translate Word=FATHER}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TAG}" Header="{Binding Source={Localization:Translate Word=TAG}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=HEADER, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=功能}}"  Width="Auto" MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=ICON}" Header="{Binding Source={Localization:Translate Word=ICON}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUID}" Header="{Binding Source={Localization:Translate Word=MENUID}}"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUITEM}" Header="{Binding Source={Localization:Translate Word=MENUITEM}}"   Width="Auto"  MinWidth="60"/>
                            <DataGridTextColumn Binding="{Binding Path=LARGEICON}" Header="{Binding Source={Localization:Translate Word=LARGEICON}}"  Width="Auto" MinWidth="40"/-->
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=功能定义}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=装载本地}}" Click="butFunctionLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="butFunctionITXLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=编辑}}" Click="butFunctionEdit_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=复制}}" Click="butFunctionCopy_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=全部复制}}" Click="butFunctionCopyAll_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="butFunctionSave_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=取消}}" Click="butDiscard_Click"></Button>
                        <TextBlock>ROWNID</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROWNID, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="60" />
                        <TextBlock>TYPE</TextBlock>
                        <TextBox Name="txtType"  HorizontalAlignment="Left" Margin="3" KeyDown="txtFunctionType_KeyDown"
                                   Text="{Binding Path=TYPE, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                        <TextBlock Text="{Binding Source={Localization:Translate Word=回车FULLNAME}}"></TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=FULLNAME, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                        <TextBlock>FILENAME</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=FILENAME, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                        <TextBlock Text="{Binding Source={Localization:Translate Word=描述}}"></TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=DESCRIPTION, Converter={StaticResource ResourceKey=gb2312}, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                    </WrapPanel>
                    <DataGrid  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwFUNCTION}}"  
                              HeadersVisibility="Column"                           
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TYPE}" Header="{Binding Source={Localization:Translate Word=TYPE}}"   Width="Auto"  MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=NAMESPACE}" Header="{Binding Source={Localization:Translate Word=NAMESPACE}}"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FULLNAME}" Header="{Binding Source={Localization:Translate Word=FULLNAME}}"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FILENAME}" Header="{Binding Source={Localization:Translate Word=FILENAME}}"  Width="Auto" MinWidth="40"/-->
                            <DataGridTextColumn Binding="{Binding Path=DESCRIPTION, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=描述}}"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid  Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPFUNCTION}}"  
                              HeadersVisibility="Column"                               
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="211,0,0.6,-7" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TYPE}" Header="{Binding Source={Localization:Translate Word=TYPE}}"   Width="Auto"  MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=NAMESPACE}" Header="{Binding Source={Localization:Translate Word=NAMESPACE}}"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FULLNAME}" Header="{Binding Source={Localization:Translate Word=FULLNAME}}"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FILENAME}" Header="{Binding Source={Localization:Translate Word=FILENAME}}"  Width="Auto" MinWidth="40"/-->
                            <DataGridTextColumn Binding="{Binding Path=DESCRIPTION, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=描述}}"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=目录管理}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="91*" />
                        <ColumnDefinition Width="319*"/>
                        <ColumnDefinition Width="411*"/>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.ColumnSpan="3">
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=装载本地}}" Click="butFolderLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="butFolderITXLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=复制}}" Click="butFolderCopy_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=全部复制}}" Click="butFolderCopyAll_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="butFolderSave_Click"></Button>
                        <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=取消}}" Click="butDiscard_Click"></Button>
                        <TextBlock>ROWNID</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROWNID, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="40" />
                        <TextBlock>COMPANY</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=COMPANY, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="40" />
                        <TextBlock>ROOT</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROOT, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="160" />
                        <TextBlock>SUB</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=SUB, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="160" />
                    </WrapPanel>
                    <DataGrid  Grid.Row="1" Grid.Column="0"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwFOLDER}}"  
                              HeadersVisibility="Column"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.ColumnSpan="3" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="{Binding Source={Localization:Translate Word=COMPANY}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=ROOT}" Header="{Binding Source={Localization:Translate Word=ROOT}}"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=SUB}" Header="{Binding Source={Localization:Translate Word=SUB}}"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid  Grid.Row="1" Grid.Column="2"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPFOLDER}}"  
                              HeadersVisibility="Column"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="{Binding Source={Localization:Translate Word=COMPANY}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=ROOT}" Header="{Binding Source={Localization:Translate Word=ROOT}}"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=SUB}" Header="{Binding Source={Localization:Translate Word=SUB}}"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=翻译}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
                        <WrapPanel >
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="butMULLANGITXLoad_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=新建}}" Click="butNEWMULLANG_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=编辑}}" Click="butMULLANGEdit_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=未翻译}}" Click="butToDo_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=相同键值}}" Click="butSameKeyEdit_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=同步}}" Click="butSame_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=全部复制}}" Click="butMULLANGCopyAll_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="butMULLANGSave_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=取消}}" Click="butDiscard_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=探索}}" Click="butDiscovery_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=修正}}" Click="butRepaire_Click"></Button>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock>ID</TextBlock>
                            <TextBlock   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROWNID, Source={StaticResource ResourceKey=vwTMPMULLANG}}" VerticalAlignment="Center" Width="60" />
                            <TextBlock Text="{Binding Source={Localization:Translate Word=程序}}"></TextBlock>
                            <TextBox HorizontalAlignment="Left" Margin="3" 
                                   Text="{Binding Path=MLLOC, Source={StaticResource ResourceKey=vwTMPMULLANG}}" VerticalAlignment="Center" Width="120" />
                            <TextBlock Text="{Binding Source={Localization:Translate Word=关键字}}"></TextBlock>
                            <TextBox Name="txtMLKey"  HorizontalAlignment="Left" Margin="3" 
                                   Text="{Binding Path=MLKEY, Source={StaticResource ResourceKey=vwTMPMULLANG}, Converter={StaticResource ResourceKey=gb2312}}" VerticalAlignment="Center" Width="120" />
                            <TextBlock>English</TextBlock>
                            <TextBox  Name="txtEN"  HorizontalAlignment="Left" Margin="3" Text="{Binding Path=EN, Source={StaticResource ResourceKey=vwTMPMULLANG}}" KeyUp="TextBox_KeyUp" VerticalAlignment="Center" Width="120" />
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=同步}}" Click="butSame_Click"></Button>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=简体中文}}"></TextBlock>
                            <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=SCN, Source={StaticResource ResourceKey=vwTMPMULLANG},Converter={StaticResource ResourceKey=gb2312}}" VerticalAlignment="Center" Width="120" />
                        </WrapPanel>
                        <WrapPanel>
                            <WrapPanel>
                                <TextBlock Text="{Binding Source={Localization:Translate Word=目标程序}}"></TextBlock>
                                <ComboBox 
                                    Name="txtMLloc"
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwICC_FUNCTIONS}}"
                                Background="Gray"  MinWidth="100"  
                                       DisplayMemberPath="TYPE"
                                       IsEditable="True"
                                      SelectedValuePath="TYPE"
                                       >
                                </ComboBox>
                            </WrapPanel>

                        </WrapPanel>
                    </StackPanel>

                    <DataGrid  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                               Name="dlgTran"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMULLANG}}"  
                              HeadersVisibility="Column"                           
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MLLOC}" Header="{Binding Source={Localization:Translate Word=程序}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MLKEY, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=关键字}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=EN}" Header="{Binding Source={Localization:Translate Word=英文}}"  Width="Auto" MinWidth="80"/>
                            <DataGridTextColumn Binding="{Binding Path=SCN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=中文}}"  Width="Auto" MinWidth="80"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid  Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPMULLANG}}"  
                              HeadersVisibility="Column"                               
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0.6,0" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MLLOC}" Header="{Binding Source={Localization:Translate Word=程序}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MLKEY, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=关键字}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=EN}" Header="{Binding Source={Localization:Translate Word=英文}}"  Width="Auto" MinWidth="80"/>
                            <DataGridTextColumn Binding="{Binding Path=SCN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=中文}}"  Width="Auto" MinWidth="80"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=移库编码}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
                        <WrapPanel >
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="butGABBSLoad_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=新建}}" Click="butNEWGABBS_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=编辑}}" Click="butGABBSEdit_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=复制}}" Click="butGABBSCopy_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=全部复制}}" Click="butGABBSCopyAll_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="butGABBSSave_Click"></Button>
                            <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=取消}}" Click="butDiscard_Click"></Button>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock>ID</TextBlock>
                            <TextBlock   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROWNID, Source={StaticResource ResourceKey=vwTMPMULLANG}}" VerticalAlignment="Center" Width="60" />
                            <TextBlock Text="{Binding Source={Localization:Translate Word=关键字}}"></TextBlock>
                            <TextBox   HorizontalAlignment="Left" Margin="3" 
                                   Text="{Binding Path=GABBS, Source={StaticResource ResourceKey=vwTMPMULLANG}, Converter={StaticResource ResourceKey=gb2312}}" VerticalAlignment="Center" Width="120" />
                            <TextBlock>English</TextBlock>
                            <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=EN, Source={StaticResource ResourceKey=vwTMPMULLANG}}" VerticalAlignment="Center" Width="120" />
                            <TextBlock Text="{Binding Source={Localization:Translate Word=简体中文}}"></TextBlock>
                            <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=SCN, Source={StaticResource ResourceKey=vwTMPMULLANG},Converter={StaticResource ResourceKey=gb2312}}" VerticalAlignment="Center" Width="120" />
                        </WrapPanel>
                    </StackPanel>

                    <DataGrid  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwGABBS}}"  
                              HeadersVisibility="Column"                           
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=GABBS}" Header="{Binding Source={Localization:Translate Word=关键字}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=EN}" Header="{Binding Source={Localization:Translate Word=英文}}"  Width="Auto" MinWidth="80"/>
                            <DataGridTextColumn Binding="{Binding Path=SCN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=中文}}"  Width="Auto" MinWidth="80"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid  Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPGABBS}}"  
                              HeadersVisibility="Column"                               
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0.6,0" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=GABBS}" Header="{Binding Source={Localization:Translate Word=关键字}}"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=EN}" Header="{Binding Source={Localization:Translate Word=英文}}"  Width="Auto" MinWidth="80"/>
                            <DataGridTextColumn Binding="{Binding Path=SCN, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=中文}}"  Width="Auto" MinWidth="80"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</local:DocumentBase>
